<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>

<script>
  function Number(a, b) {
    var num = 0;
    for (var i = a; i <= b; i++) {
      for (var j = 2, g = 0; j < i; j++) {
        if (i % j == 0) {
          g++;
          break;
        }
      }
      if (g == 0) {
        console.log(`质数为${i}`);
        num++;
      }
    }
    console.log(`总共有${num}个质数`);
  }
  Number(100, 200);
</script>
